{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "字典的一般方法\n",
    "info = {\n",
    "    \"stu1801\":\"Liu\",\n",
    "    \"stu1802\":\"Jia\",\n",
    "    \"stu1803\":\"Qi\"\n",
    "}\n",
    "print(info)\n",
    "{'stu1801': 'Liu', 'stu1802': 'Jia', 'stu1803': 'Qi'}\n",
    "for i in info:\n",
    "    print\n",
    " i只是key的值，并没有真正意义上获取到字典的完整信息\n",
    "stu1801\n",
    "stu1802\n",
    "stu1803\n",
    "实践：学号的k 去掉stu 然后输出新的字典\n",
    "new_info = {}\n",
    "\n",
    "for k,v in info.items():\n",
    "    字典的新增\n",
    "    new_info[k[3:]] = v.upper()\n",
    "\n",
    "new_info\n",
    "{'1801': 'Liu', '1802': 'Jia', '1803': 'Qi'}\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}